﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Utility1;

namespace Thv.trangchu.canhan
{
    public partial class canhan1 : System.Web.UI.MasterPage
    {
        protected string templatePath;
        protected void Page_Load(object sender, EventArgs e)
        {
            templatePath = WebUtils.GetBaseUrl();
            if (!IsPostBack)
            {
                lbThoigian.Text = DateTime.Now.ToLongDateString();
                UserDB user_obj = (UserDB)Session[Global.SESS_SECURITY_CODE];
                if (user_obj != null)
                {
                    if (user_obj.photo != null)
                        imgHinh.ImageUrl = templatePath + "/trangchu/canhan/photo/" + user_obj.photo;
                    else
                        imgHinh.ImageUrl = templatePath + "/trangchu/canhan/photo/noimage.png";
                    ltrWellcome.Text = user_obj.Lastname + " " + user_obj.FirtName;
                    lbTen.Text = user_obj.Lastname + " " + user_obj.FirtName;
                    linkHome.NavigateUrl = templatePath;
                    linkExit.NavigateUrl = templatePath + "/trangchu/page/thoat.html";
                }
                else
                    Response.Redirect(templatePath);
            }
        }
    }
}